package cn.wizzer.framework.base.exceptions;

import cn.wizzer.framework.base.model.enums.BizExceptionEnum;

public class BizException extends RuntimeException{
    private Object remand;

    public BizException(BizExceptionEnum message) {
        super(message.toString());
        remand = message;
    }

    public BizException() {
    }

    public BizException(String cause) {
        super(cause);
        this.remand = cause;
    }


    public static BizException NEW(BizExceptionEnum message){
        return new BizException(message);
    }

    public String getRemand() {
        return remand.toString();
    }

    @Override
    public String toString() {
        return "BizException{" +
                "remand='" + remand + '\'' +
                '}';
    }
}
